

<div class="twelve columns header_nav" style="margin-bottom:0; box-shadow: none;padding-top:0px">
    <ul id="menu-header" class="nav-bar horizontal">
      @foreach ($navLinks as $link)
          @if($link->auth == Auth::check() && $link->header == true)
            @if(empty($link->page->action))
              <li class="{{$link->status}}"><a href="{{url($link->controller->name)}}">{{$link->controller->alias}}</a></li>
            @else
              <li class="has-flyout {{$link->status}}">
                <a href="{{url($link->controller->name)}}" onclick="return false">{{$link->controller->alias}}</a>
                <ul class="flyout">
                  @foreach ($link->page->action as $linkPage)
                  <!-- <pre>{{var_dump($linkPage)}} -->
                    @if($linkPage->auth == Auth::check())
                    <li class="has-flyout"><a href="{{url($link->controller->name.'/'.$linkPage->name)}}">{{$linkPage->alias}}</a></li>
                    @endif
                  @endforeach
                </ul>
              </li>
            @endif
          @endif
      @endforeach
    </ul>
</div>